package bugfixes;

/**
 * v2 additions:
 * 
 * GEItemInfo -> GEItem
 * fixes wrapper methods too
 * fixes minimum and maximum too instead of only market
 * 
 * @author wolf
 *
 */

public class GEMethodFix extends Fix{

	@Override
	public String fixed(String in) {
		
		in = in.replaceAll("grandExchange\\.loadItemInfo\\((.*)\\)\\.getM(.*)Price\\(\\)", "grandExchange.loadItemInfo($1).getGuidePrice()");
		in = in.replaceAll("\\.getM(.*)Price\\(\\)", ".getGuidePrice()");
		
		in = in.replace("import org.rsbot.script.GEItemInfo;", "import org.rsbot.script.GrandExchange.GEItem;");
		in = in.replace("GEItemInfo", "GEItem");
		
		return in;
	}

}
